== OnTime ==

This plugin tracks the playing time for all players in a simple and lightweight file-based DB. (No SQL required)  With this plugin a top xx list can be generated in game, current and total playing statistics can be displayed (also in game), and daily/weekly/monthly reports of all players can be generated and viewed (off line).  Administrators can define// OnTime Rewards// which will cause econ amounts, items, permission group changes, permission grants, command executions, and XP to be automatically issued to a player when they have achieved a specified total playtime on the server.  [[http://dev.bukkit.org/server-mods/vault/|Vault]] is used so //OnTime Rewards// and permissions are supported by multiple economy and permission plugins.

=== Features: ===
**(Items in BOLD are new in the latest 2.4 release of OnTime)**
\\
\\
//
**Playing Time Statistics**
//
* Display your own OnTime data: (configurable) plugin default: current login, daily/weekly**/monthly**, and total time on the server
* Display anther player's OnTime data: (configurable) plugin default: days since first login, different days on server, current login time, **AFK status, AFK time for login**, current day/week**/month** time, total server time, and next //OnTime reward(s)//
* Display all online players current session and total time
* Display top # players, ranked by total time
* Display of last login time stamp in top # list
* Display top # players, ranked by total time for the day/week**/month**
* What is displayed to the player for all of the above can be configured by the administrator.

//
**Rewards**
//
* Define economy rewards issued to players for their time played on the server
* Define MC item rewards issued to players for their time played on the server
* Automatically change permission group for players when they reach a specified time on the server. 
* Grant a player with a new permission when they reach a specified time on the server
* Execute (almost) any command for a player when they reach a specified time on the server
* Give a player a specified amount of XP (Experience points)
* Define Econ, Item, Command, and XP rewards as recurring
* Display of the next rewards to be issued to all online players
* Enable/disable display of 'reward issued' messages to players
* Definition of Individual (or indi) Rewards, which can be issued to a specific player at a specified future time.
* **Issue some rewards to only members of certain permission groups. e.g. doners**
* **Ability to suspend issue of rewards while a player is AFK.**

//
**Manipulate a Player's Data**
//

* Set a player's //total OnTime//
* Set a player's number of different days on server
* Add time to a player's //total OnTime//
* Remove a player from the OnTime data files
* **Configure plugin to exclude players time 'AFK' from total and daily/weekly/monthly calculations**

//
**Generate Reports**
//

* HTML and TXT Report format options
* Generate a report file of all players total time and time stamp of last login event
* Generate a report file of all players time on your server today, for the week, or for the month
* Configure the 'first day of the week' for weekly reports
* **Configure the 'first day of the month' for monthly reports.
* Auto generation of total and daily/weekly**/monthly** reports

//
**Manage The //OnTime// Plugin**
//

* Auto-purge inactive or players with low total OnTime from the data files
* Scheduled saves of OnTime data to disk
* Auto update of all online players data, file save, and data purge on server shutdown/reset
* 'test commands to simulate login/logout events creating fake OnTime records / test daily reports
* Logging of OnTime auto purge activity, player login and quit events, and reward system events
* Manual and Automated Generation of Backup versions of OnTime '.dat' files.

//
**Other Plugin Integration **
//

* Use of [[http://dev.bukkit.org/server-mods/vault/|Vault]] for support of multiple economy and permission plugins
* Integration with Vault Permissions for group changes and permissions add
>
\\
> Please see the [[http://dev.bukkit.org/server-mods/ontime/pages/|pages]] for permissions, configuration, commands, etc.
\\
=== Installation ===
# Place ontime.jar in your plugin folder
# Download  [[http://dev.bukkit.org/server-mods/vault/|vault.jar]] and place that also in your plugin folder
# (Option) Download Essentials [[http://dev.bukkit.org/server-mods/essentials/|GroupManager.jar]] ** or another Vault supported permissions plugin** and place that in your plugin folder
# Reset your server
\\
\\
If the **optional** Permissions plugin is installed:
# Edit /plugin/ontime/rewards.yml, listing the permissions groups from lowest to highest under the 'groups:' keyword
\\
\\
If the **optional** commands rewards are to be used:
# Edit /plugin/ontime/rewards.yml, defining the commands that can be 'rewarded' under the 'commands:' keyword
\\
\\
If the you want to change the output the plugin sends a player:
# Edit /plugin/ontime/output.yml, following the instructions found in that file.
\\
# If the output.yml and/or rewards.yml have been modified, then you must reset your server again
\\
=== Future Enhancements Under Consideration ===

* YML storage of OnTime data (.dat)
* MySQL storage (option) of OnTime data
* Rewards to players when players they recommend log OnTime (aka subids)
* Rewards to top players
* Ability to track daily, weekly, and monthly (not just one of the three)
* Group-based reward multipliers
* Ability to import playtime from console logs
* Improved In-game help for OnTime commands
* More OnTime based Server Stats

> 
=== Feature Requests: === 
> If you want to request a feature to be added to this plugin, or you think any of the above should be given a higher priority, please submit a ticket or vote for existing ones. 

=== Please Leave Comments ===
I'd love to hear what you think (good and bad) about this plugin.  It will help me know if its worth keeping up on the maintenance.  Thanks. Edge

=== Change Log ===
* v1.0 - Initial upload version (alpha)
* v1.1 - Initial public release
* v1.2 - Fixed typo in report file
* v1.3.0 - tested with CB 1.7 / added daily usage tracking & reports / added remove command
* v1.4.0 - Added OnTime Rewards system and related commands; fixed exception errors on '/ontime' and '/ontime <userid>' commands
* v1.4.1 - Fixed minor error in rewards.yml file generation
* v2.0.0 - Added Item and Group rewards; added 'set' and 'add' commands; added more info to user data display; fixed 'daily' data file corruption error
* v2.0.1 - Improved handling for servers without Essentials GroupManager; Added log entries for use of 'remove', 'set', and 'add' commands.
* v2.1.0 - Added Permission rewards; Added recurring econ and item rewards; Added 'set days' command; Integrated with Vault Permissions (simplified group reward configuration); Fixed 'days on' counting error
* v2.2.0 - Added HTML option for report output; Added weekly vs daily option for short-term tracking; Added '/ontime today/week' top user display; Added enable/disable of reward msgs to players; Fixed error with recurring rewards when inventory full
* v2.2.1 - Fixed several errors including permissions plugin sync, kick event extra time credits, and HTML weekly/daily output.
* v2.3.0 - Added configurable output when rewards are issued, information displayed in 'ontime' command, and headers in 'Top xx'; Added 'individual' reward definition and associated commands; Modified syntax of 'Top xx' command; Fixed various errors including [SEVERE] error seen when rewards are disabled, and incorrect file paths on non-windows servers.
* v2.3.1 - Added command (/ontime backup) and automated generation of backup of data files.
* v2.4.0 - Added exclusive (permission group) rewards and associated commands; Added detection of players' 'AFK' status, with automated removal of time spent AFK from OnTime calculations and rewards decisions; Expanded collection period options to include 'monthly' reporting; added configurable console message logging; fixed several 'null pointer' exception errors reported by users; updated config.yml, rewards.yml, output.yml